const user3 = {
    namespaced: true,
    state: () => ({
        username: 'user3酱紫',
        age: 0,
        descrption: ''
    }),
    mutations: {
        setName(state, val = '小江3号') {
            state.username = val
        },
        setNameAdd(state, val) {
            state.username += val
        },
        setAge(state) {
            state.age += 10
        },
        setAgeAdd(state, value) {
            state.age += value
        }
    },
    actions: {
        asyncsetName(ctx, val) {
            ctx.commit('setName', val)
        },
        asyncNameAdd(ctx, value) {
            ctx.commit('setNameAdd', value)
        },
        setAge(ctx, value) {
            ctx.commit('setAge')
        },
        asyncsetAge(ctx, value) {
            ctx.commit('setAgeAdd', value)
        }
    },
    getters: {
        des(state) {
            return state.username + '年龄有' + state.age + '岁了'
        }
    }
}

export default user3